Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Forward refs with lazy() #57

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

rschristian
Copy link
Member

Re: preactjs/preact-www#1223

Seems reasonable enough to me to match preact/compat's behavior here w/ forwarding from lazy().

@@ -1,6 +1,15 @@
import { h, options } from 'preact';
import { useState, useRef } from 'preact/hooks';

const oldDiff = options.__b;
options.__b = (vnode) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When compat is imported this would exist twice, not a bad thing necessarily just wanted to point it out

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, I'm not aware of any side effects though, are there any? If so, any good ways to avoid it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants